package com.design.factory.simple;


import com.design.factory.common.service.Pizza;

/**
 * @author zhengzihong
 * @version 1.0.0
 * @date 2018/9/13
 * @Description
 */
public class PizzaStore {

    SimplePizzaFactory factory;

    PizzaStore(SimplePizzaFactory factory){
        this.factory = factory;
    }

    public Pizza orderPizza(String type){
        Pizza pizza = factory.createPizza(type);
        pizza.prepare();
        pizza.bake();
        pizza.cut();
        pizza.box();
        return pizza;
    }
}
